package com.cloudlead.plugin.security.query;

import static com.mysema.query.types.PathMetadataFactory.*;
import com.cloudlead.plugin.security.entity.EScUser;


import com.mysema.query.types.path.*;

import com.mysema.query.types.PathMetadata;
import javax.annotation.Generated;
import com.mysema.query.types.Path;

import com.mysema.query.sql.ColumnMetadata;
import java.sql.Types;

import com.mysema.query.sql.*;

import com.cloudlead.common.lang.annotation.Label;


/**
 * QScUser is a Querydsl query type for EScUser
 */
@Label("用户查询")
@Generated("com.cloudlead.utils.persistence.codegen.serializer.SimpleMetaDataSerializer")
public class QScUser extends RelationalPathBase<EScUser> {

    private static final long serialVersionUID = 830821074;

    public static final QScUser scUser = new QScUser("sc_user");

    public class PrimaryKeys {

        public final PrimaryKey<EScUser> primary = createPrimaryKey(id);

    }

    public class ForeignKeys {

        public final ForeignKey<com.cloudlead.plugin.security.entity.EScUserHasRole> _scUserHasRoleScUser1Fk = createInvForeignKey(id, "sc_user_id");

        public final ForeignKey<com.cloudlead.plugin.security.entity.EScUserHasPrivilege> _scUserHasPrivilegeScUser1Fk = createInvForeignKey(id, "sc_user_id");

        public final ForeignKey<com.cloudlead.plugin.security.entity.EScGroupHasUser> _scGroupHasUserScUser1Fk = createInvForeignKey(id, "sc_user_id");

    }

    public final StringPath defaultGroup = createString("defaultGroup");

    public final StringPath email = createString("email");

    public final StringPath id = createString("id");

    public final BooleanPath locked = createBoolean("locked");

    public final StringPath mobile = createString("mobile");

    public final StringPath password = createString("password");

    public final StringPath salt = createString("salt");

    public final StringPath username = createString("username");

    public final PrimaryKeys pk = new PrimaryKeys();

    public final ForeignKeys fk = new ForeignKeys();

    public QScUser(String variable) {
        super(EScUser.class, forVariable(variable), "null", "sc_user");
        addMetadata();
    }

    public QScUser(String variable, String schema, String table) {
        super(EScUser.class, forVariable(variable), schema, table);
        addMetadata();
    }

    public QScUser(Path<? extends EScUser> path) {
        super(path.getType(), path.getMetadata(), "null", "sc_user");
        addMetadata();
    }

    public QScUser(PathMetadata<?> metadata) {
        super(EScUser.class, metadata, "null", "sc_user");
        addMetadata();
    }

    public void addMetadata() {
        addMetadata(defaultGroup, ColumnMetadata.named("default_group").withIndex(8).ofType(Types.CHAR).withSize(24));
        addMetadata(email, ColumnMetadata.named("email").withIndex(5).ofType(Types.VARCHAR).withSize(255));
        addMetadata(id, ColumnMetadata.named("id").withIndex(1).ofType(Types.CHAR).withSize(24).notNull());
        addMetadata(locked, ColumnMetadata.named("locked").withIndex(7).ofType(Types.BIT).notNull());
        addMetadata(mobile, ColumnMetadata.named("mobile").withIndex(4).ofType(Types.VARCHAR).withSize(255));
        addMetadata(password, ColumnMetadata.named("password").withIndex(3).ofType(Types.VARCHAR).withSize(100).notNull());
        addMetadata(salt, ColumnMetadata.named("salt").withIndex(6).ofType(Types.VARCHAR).withSize(100));
        addMetadata(username, ColumnMetadata.named("username").withIndex(2).ofType(Types.VARCHAR).withSize(100).notNull());
    }

}

